try {
	var tagName = "%@";
	var id = "%@";
	var errStr = "no element with id '" + id + "' found in page";

	if ("a" == tagName) {
		var a = document.getElementById(id);
		if (a) {
			document.location = a.href;
		} else {
			throw new Error(errStr);
		}
	} else {
		var el = document.getElementById(id);
		if (el) {
			el.click();
		} else {
			throw new Error(errStr);
		}
	}
} catch (e) {
	return "_TOD_ERROR: " + e.toString();
}

